﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MShop.Core;

namespace MShop.Web.Controllers
{
    public class ErrorController : ControllerBase
    {
         private readonly IShopContext _IShopContext;
         public ErrorController(IShopContext shopContext) 
        {            
            
            _IShopContext = shopContext;
        }
        

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult E404()
        {
            ViewData["Url"] = _IShopContext.Settings.WebSiteUrl;
            ViewData["QQ"] = _IShopContext.Settings.WebSiteQQ;
            AppendMeta(_IShopContext.Settings.WebSiteName);
            return View();
        }

        public ActionResult E500()
        {
            ViewData["Url"] = _IShopContext.Settings.WebSiteUrl;
            ViewData["QQ"] = _IShopContext.Settings.WebSiteQQ;
            AppendMeta(_IShopContext.Settings.WebSiteName);
            return View();
        }

    }
}
